<?php
class Response {
	private $__config, $__apiconfig;
	private $player;
	function __construct($config){
		$this->__config = &$config;
		$this->__apiconfig = $this->__config->get('API')->get('APIPLAYER');		
	}
	
	function __destruct(){
		
	}
	
	public function toString(){
		//header("Content-type: text/xml");
		$rate = $_GET['val'];
		$siteID = $_GET['siteid'];
		if (!is_numeric($rate) || !is_numeric($siteID)) return "FAIL";
		$this->__config->DB->createConnection();
		$this->__config->DB->query("UPDATE tbl_sitemaps SET rate = rate + (".$rate.") WHERE id=".$siteID);
		$this->__config->DB->destroyConnection();
		return "OK";
	}
}
?>
